﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using V5_Common;

namespace V5_EShop.Admin {
    public partial class Admin_LogOut : System.Web.UI.Page {
        protected void Page_Load(object sender, EventArgs e) {
            try {
                if (Request.Cookies["admins"] != null || Request.Cookies[FormsAuthentication.FormsCookieName] != null) {
                    HttpCookie cookie = Request.Cookies[FormsAuthentication.FormsCookieName];
                    cookie.Expires = DateTime.Now.AddMinutes(-1.0);
                    HttpCookie cookie1 = Request.Cookies["admins"];
                    cookie1.Expires = DateTime.Now.AddMinutes(-1.0);
                    Response.Cookies.Add(cookie);
                    Response.Cookies.Add(cookie1);
                }
            }
            catch (Exception ex) {
            }

            JsHelper.ParentRedirect("Admin_Login.aspx");
        }
    }
}